// API响应类型定义
export interface ApiResponse {
	spu?: {
		_categoryChainIds: string
		supplier_id: number
		numbering: string
		name: string
		category_id: string
		is_second_hand: number
		is_virtual: number
		created_by_user: number
		_keywords: string[]
		sort: number
		is_put_on_sale: number
		_putOnSaleRange?: [string, string]
		is_auto_put_on_sale: number
		is_auto_put_off_sale: number
		freight_price: number
		_remoteFreights: any[]
		is_present_insurance: number
	}
	attrs?: any[]
	skus?: any[]
	list?: any[]
	file?: {
		abUrl: string
		id: number
	}
	id?: number
}

// 保存结果类型定义
export interface SaveResult {
	success: boolean
	id?: number
	route?: {
		path: string
		query?: Record<string, any>
	}
}

// 商品编辑表单类型定义
export interface GoodsEditForm {
	id: number
	permissionName: string
	attrs: any[]
	skus: any[]
	spu: {
		numbering: string
		name: string
		keywords: string[]
		categoryId: string
		_categoryChainIds: string[]
		supplierId: string
		isSecondHand: boolean
		isVirtual: boolean
		createdByUser: number
	}
	salesInfo: {
		sort: number
		isPutOnSale: boolean
		putOnSaleRange: any
		isAutoPutOnSale: boolean
		isAutoPutOffSale: boolean
	}
	freightInfo: {
		freightPrice: number
		remoteFreights: any[]
	}
	otherData: {
		isPresentInsurance: boolean
	}
	copiedById: number
}
